﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/admin.master" AutoEventWireup="true" CodeFile="insert.aspx.cs" Inherits="aspx_admin_hdly_insert" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Title" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="活动掠影ID" DataSourceID="ods活动掠影" DefaultMode="Insert" OnItemInserting="FormView1_ItemInserting">

        <InsertItemTemplate>
            <table>
                <tr>
                    <td>名称:<asp:TextBox ID="名称TextBox" runat="server" Text='<%# Bind("名称") %>' /></td>
                </tr>
                <tr>

                    <td>

                        <asp:FileUpload ID="FileUpload1" runat="server" />小图片:182*121(像素px),文件格式使用jpg或者bmp
                        <asp:Label ID="小图片TextBox" runat="server" Text='<%# Bind("小图片") %>' />
                    </td>
                </tr>

                <tr>
                    <td>内容:*     <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="发布" CssClass="btn" /></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:TextBox ID="全文内容TextBox" runat="server" Text='<%# Bind("内容") %>' TextMode="MultiLine"
                            Columns="80" Rows="16" CausesValidation="true" />
                    </td>
                </tr>
                <tr>

                    <td>
                        <asp:CheckBox ID="显示CheckBox" runat="server" Checked='<%# Bind("显示") %>' Enabled="false" Text="显示" /></td>
                </tr>

            </table>
        </InsertItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="ods活动掠影" runat="server" DeleteMethod="Delete" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="ds_名师讲堂TableAdapters.tb_活动掠影TableAdapter">
        <DeleteParameters>
            <asp:Parameter Name="Original_活动掠影ID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="名称" Type="String" />
            <asp:Parameter Name="小图片" Type="String" />
            <asp:Parameter Name="链接" Type="String" />
            <asp:Parameter Name="显示" Type="Boolean" />
            <asp:Parameter Name="内容" Type="String" />
        </InsertParameters>
    </asp:ObjectDataSource>
</asp:Content>